In the event of technical difficulties with Szkopuł, please contact us via email at [email protected].
If you would like to talk about tasks, solutions or technical problems, please visit our Discord servers. They are moderated by the community, but members of the support team are also active there.
15 thousand kinds of tulips are known in Byteland (approximately the same number of cultivars of tulips is known in the "real" world). For many years Byteasar has been maintaining his private tulip index in which each kind of these magnificent flowers has received a catalogue number between and .
Recently the board of directors of the Bytean Botanic Garden has made an interest in Byteasar's index. In the garden grow lots of different kinds of tulips. The board of directors figured out that if they are able to collect all different kinds of tulips, this would significantly increase the popularity of the garden. They asked Byteasar to find out how many kinds of tulips are still missing in the garden.
Byteasar has already managed to identify the kinds of tulips that grow in the respective beds of the garden. Unfortunately, it is hard for him to count the number of kinds of tulips that are still missing. Could you help him with that?
The first line of the standard input contains one integer () that denotes the number of beds of tulips in the garden. The second line contains integers from the interval that denote the catalogue numbers of kinds of tulips that grow in the respective beds in the garden.
Your program should write to the standard output one line with a single integer: the number of kinds of tulips that the board of directors has to buy to have all the kinds of tulips in the garden.
For the input data:
8 3 6 2 2 4 6 3 7
the correct result is:
14995
Task author: Jakub Radoszewski.